package com.xiaochi.subject.application.controller;

import com.xiaochi.subject.infra.basic.service.SubjectEsService;
import com.xiaochi.subject.infra.entity.UserInfo;
import com.xiaochi.subject.infra.rpc.UserRpc;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author zqx
 * @since 2024/9/5
 */
@RestController
@RequestMapping("/user")
@Slf4j
public class FeignController {

    @Resource
    private UserRpc userRpc;

    @Resource
    private SubjectEsService subjectEsService;

    @GetMapping("/testFeign")
    public void testFeign(){
        UserInfo userInfo = userRpc.getUserInfo("xiaochi");
        log.info("testFeign.userInfo:{}",userInfo);
    }


}
